package cn.kgc.tangcco.quartz;

import cn.kgc.tangcco.service.DujitangService;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @author 李昊哲
 * @Description
 * @create 2021/1/8 10:16
 */
public class JobDemo implements Job {
    @Autowired
    private DujitangService dujitangService;
    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        System.out.println("桃李不言下自成蹊\t" + dujitangService.queryRandom().getData().getText());
    }
}
